<template>
  <div>
    <BasicTable @register="registerTable" :dataSource="tableData" />
  </div>
</template>

<script lang="ts" setup>
  import { BasicTable, useTable } from '/@/components/Table';
  import { echartsColumns } from './dashboards.data';
  import { tableFormStyleSetting } from '/@/settings/thingsBoardDesign';

  defineProps(['tableData']);

  //表格初始化
  const [registerTable] = useTable({
    title: '时间序列表',
    columns: echartsColumns,
    showIndexColumn: false,
    immediate: true,
    showSummary: false,
    clickToRowSelect: false,
    showTableSetting: true,
    useSearchForm: false,
    formConfig: {
      layout: 'horizontal',
      showAdvancedButton: false,
      ...tableFormStyleSetting,
      actionColOptions: {
        md: { span: 8, offset: 16 },
        lg: { span: 6, offset: 16 },
        xl: { span: 4, offset: 16 },
        xxl: { span: 4, offset: 16 },
      },
    },
    rowKey: 'id',
  });
</script>
